﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace System.Net.DnsToolkit.Resolver {
    public class RandomHeaderId : IHeaderIdGenerator {

        private readonly Random _random;
        internal Random Random {
            get {
                return _random;
            }
        }
        public RandomHeaderId() {
            _random = new Random();
        }
        
        public ushort Generate() {
            int random = Random.Next(ushort.MaxValue);
            return (ushort)random;
        }

    }
}
